<template>
  <a-drawer
    width="45%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32">
          <a-col :span="12">
            <a-form-model-item label="客户ID" prop="customerId">
              <a-input v-model="form.customerId" placeholder="请输入客户ID" />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="上门时间" prop="toHomeTime">
              <a-date-picker
                v-model="form.toHomeTime"
                valueFormat="YYYY-MM-DD"
                :show-today="true"
                placeholder="选择日期"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="预约上门时间" prop="yuyueTime">
              <a-date-picker
                v-model="form.yuyueTime"
                valueFormat="YYYY-MM-DD"
                :show-today="true"
                placeholder="选择日期"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="是否作废" prop="tuofei">
              <a-input-number
                v-model="form.tuofei"
                :min="0"
                style="width: 100%"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="12">
            <a-form-model-item label="排序" prop="sort">
              <a-input-number
                v-model="form.sort"
                :min="0"
                style="width: 100%"
              />
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button @click="cancel"> 取消 </a-button>
          <a-button type="primary" @click="submitForm"> 保存 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizToHomeEditForm from "./BizToHomeForm";
export default {
  ...BizToHomeEditForm,
};
</script>
